package com.wyd.studailyleave.controller;

import com.wyd.studailyleave.Bean.Studaily;
import com.wyd.studailyleave.Service.StudailyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class HelloController {

    @Autowired
    StudailyService studailyService;
    @RequestMapping("/index")
    public String sayHello(ModelMap modelMap){
        List<Studaily> list = studailyService.queryAll();
        modelMap.addAttribute("List",list);
        return "index";
    }
}
